package com.itWaiLong.Controller.group;

import com.itWaiLong.Dao.group_project;
import com.itWaiLong.Result.Result;
import com.itWaiLong.Service.GroupProjectService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/update")
public class UpdateProjectController {

    @Autowired
    private GroupProjectService groupProjectService;

    /**
     * 修改项目信息
     * @param groupProject
     * @return
     */
    @PostMapping
    public Result updateProject(@RequestBody group_project groupProject) {
        log.info("修改项目的信息：{}", groupProject);
        groupProjectService.update(groupProject);
        return Result.success();
    }
}
